Fast address to sector number/offset translation to support odd sector size testing

ABSTRACT

Fast Address to Sector Number/Offset Translation to Support Odd Sector Size Testing. A machine-implemented method of determining a sector number from a given address for testing a solid state drive (SSD), wherein the SSD sector size is not an integral power of 2, includes determining an approximate sector size as the closest power of 2 less than the sector size and determining an error factor as the ratio of the approximate sector size divided by the sector size. The method also includes forming the sector number by shifting the address right by the base 2 logarithm of the approximate sector size.

RELATED APPLICATION(S)

This application is related to U.S. patent application Ser. No. 13/773,569, filed Feb. 11, 1013, entitled “Test Architecture Having Multiple FPGA Based Hardware Accelerator Blocks for Testing Multiple DUTs Independently,” to Chan et al., which is hereby incorporated by reference herein in its entirety for all purposes.

FIELD OF INVENTION

Embodiments of the present invention generally relate to the field of electronic device testing systems, and more specifically to translation of address to sector number/offset to support odd sector size testing, for example, of solid state drives (SSDs).

BACKGROUND

Test environments for sold state drives (SSDs) generally process data blocks to and from the SSD in standard “block” or “sector” sizes of, for example, 256, 512, or 4096 bytes. Conventionally, the block or sector of transmitted data (e.g., data read from an SSD) contained mostly, if not always, data. For example, each byte of read data received from an SSD was generally stored data.

However, new trends of remote cloud storage, often involving internet and/or wireless transmission, have introduced new considerations to data formats. For example, in order to increase data integrity, various forms of metadata, protection data, e.g., data rights, error correction data, and the like are being included in data transfers, e.g., read and write operations, to and from SSDs. Such additional information or “overhead” is included in transmissions to and from and SSD, in addition the actual data content that is stored by the SSD.

As a result of such additional overhead, SSD manufacturers have started to utilize non-standard sector sizes to accommodate such overhead. Such non-standard “sector sizes,” or “transmission block sizes” now include transmission blocks of 512, 520, 528, 4096, 4014 and 4160 bytes. Other transmission block sizes are also in use and/or contemplated.

Unfortunately, most conventional art SSD testing devices cannot accept these non-standard sector sizes.

SUMMARY OF THE INVENTION

It would be highly valuable and desirable for an SSD tester to operate with solid state drives implementing non-standard sector sizes.

Therefore, what is needed are systems and methods for fast address to sector number/offset translation to support odd sector size testing. What is additionally needed are systems and methods for fast address to sector number/offset translation to support odd sector size testing that do not require division by denominators that are not integral powers of two. What is further needed are systems and methods for fast address to sector number/offset translation to support odd sector size testing that are compatible and complementary with existing systems and methods of automated test equipment. Embodiments of the present invention provide these advantages and enhance the user's experience.

In accordance with a method embodiment of the present invention, a machine-implemented method of determining a sector number from a given address for testing a solid state drive (SSD), wherein the SSD sector size is not an integral power of 2, includes determining an approximate sector size as the closest power of 2 less than the sector size and determining an error factor as the ratio of the approximate sector size divided by the sector size. The method also includes forming the sector number by shifting the address right by the base 2 logarithm of the approximate sector size.

In accordance with another embodiment of the present invention, an automated test equipment (ATE) for simultaneous testing of multiple solid state drives (SSDs), wherein the SSD has a sector size that is not an integral power of two, includes logic of the ATE configured to determine a starting sector of the SSD that corresponds to a given starting address. The logic is configured to determine an approximate sector size as the closest power of 2 less than the sector size and determine an error factor as the ratio of the approximate sector size divided by the sector size. The logic is further configured to form the sector number by shifting the address right by the base 2 logarithm of the approximate sector size.

In a further embodiment according to the present invention, a system for simultaneous testing of multiple solid state drives (SSDs), wherein the SSD has a sector size that is not an integral power of two, the system includes a tester block (210) configured to receive a command to write an amount of data to the SSD starting at a starting address. The starting address is not constrained to correspond to a sector boundary and the amount of data is not constrained to be an integral multiple of the SSD data sector size. The logic within the tester block (210) configured to determine a starting sector of the SSD corresponding to the starting address. The logic is configured to determine an approximate sector size as the closest power of 2 less than the sector size and determine an error factor as the ratio of the approximate sector size divided by the sector size. The logic is further configured to form the sector number by shifting the address right by the base 2 logarithm of the approximate sector size.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and form an integral part of this specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention. Unless otherwise noted, the drawings are not drawn to scale.

FIG. 1 illustrates an exemplary block diagram of an exemplary electronic test system, which may be used as a platform to implement embodiments of the present invention.

FIG. 2 is a detailed schematic block diagram of an exemplary instantiated FPGA tester block, according to an embodiment of the present invention.

FIG. 3 is an exemplary data diagram illustrating processing a command from a tester processor.

FIG. 4 illustrates an exemplary machine-implemented method of write testing a solid state drive (SSD) having a non-standard sector size, in accordance with embodiments of the present invention.

FIG. 5 illustrates an exemplary machine-implemented method of read/verify-testing a solid state drive (SSD) having a non-standard sector size, in accordance with embodiments of the present invention.

DETAILED DESCRIPTION

Reference will now be made in detail to various embodiments of the present invention, examples of which are illustrated in the accompanying drawings. While the invention will be described in conjunction with these embodiments, it is understood that they are not intended to limit the invention to these embodiments. On the contrary, the invention is intended to cover alternatives, modifications and equivalents, which may be included within the spirit and scope of the invention as defined by the appended claims. Furthermore, in the following detailed description of the invention, numerous specific details are set forth in order to provide a thorough understanding of the invention. However, it will be recognized by one of ordinary skill in the art that the invention may be practiced without these specific details. In other instances, well known methods, procedures, components, and circuits have not been described in detail as not to unnecessarily obscure aspects of the invention.

Notation and Nomenclature

Some portions of the detailed descriptions which follow (e.g., methods 400, 500) are presented in terms of procedures, steps, logic blocks, processing, and other symbolic representations of operations on data bits that may be performed on computer memory. These descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. A procedure, computer executed step, logic block, process, etc., is here, and generally, conceived to be a self-consistent sequence of steps or instructions leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated in a computer system. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, data, or the like.

It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussions, it is appreciated that throughout the present invention, discussions utilizing terms such as “capturing” or “storing” or “reading” or “analyzing” or “generating” or “resolving” or “accepting” or “selecting” or “determining” or “displaying” or “presenting” or “computing” or “sending” or “receiving” or “reducing” or “detecting” or “setting” or “accessing” or “placing” or “testing” or “forming” or “mounting” or “removing” or “ceasing” or “stopping” or “coating” or “processing” or “performing” or “generating” or “adjusting” or “creating” or “executing” or “continuing” or “indexing” or “translating” or “calculating” or “measuring” or “gathering” or “running” or the like, refer to the action and processes of, or under the control of, a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.

The meaning of “non-transitory computer-readable medium” should be construed to exclude only those types of transitory computer-readable media which were found to fall outside the scope of patentable subject matter under 35 U.S.C. § 101 in In re Nuijten, 500 F.3d 1346, 1356-57 (Fed. Cir. 1007). The use of this term is to be understood to remove only propagating transitory signals per se from the claim scope and does not relinquish rights to all standard computer-readable media that are not only propagating transitory signals per se.

Fast Address to Sector Number/Offset Translation to Support Odd Sector Size Testing

FIG. 1 illustrates an exemplary block diagram of an exemplary electronic test system 100, which may be used as a platform to implement embodiments of the present invention. System 100 may also be known as, or referred to as, Automatic Test Equipment or as an Automated Test Environment (ATE). In one embodiment, ATE apparatus 100 may be implemented within any testing system capable of testing multiple DUTs simultaneously. Devices to be tested may include, for example, integrated circuits, circuit boards comprising a myriad of integrated circuits and other electronic components, rotating magnetic media devices (“hard disk drives”), solid state drives (“SSDs”), and the like.

Referring to FIG. 1, an ATE apparatus 100 for testing devices, in accordance with an embodiment of the present invention includes a system controller 101, a network switch 102 coupling the system controller to the site module boards 130A-130N, FPGA devices 111A-111M comprising instantiated FPGA tester blocks 110A-110N, memory block modules 140A-140M wherein each of the memory blocks 140A-140M is coupled to one of the FPGA devices 111A-111M, and the devices under test (DUTs) 120A-120N, wherein each device under test 120A-120N is coupled to one of the instantiated FPGA tester blocks 110A-110N.

In one embodiment, the system controller 101 may be a computer system, e.g., a personal computer (PC) that provides a user interface for the user of the ATE to load the test programs and run tests for the DUTs coupled to the ATE 100. The Verigy Stylus™ Operating System is one example of test software often used during device testing. It provides the user with a graphical user interface from which to configure and control the tests. It can also comprise functionality to control the test flow, control the status of the test program, determine which test program is running, and log test results and other data related to test flow. In one embodiment, the system controller can be coupled to and control as many as 512 DUTs.

In one embodiment, the system controller 101 can be coupled to the site module boards 130A-130N through a network switch, such as an Ethernet switch. In other embodiments, the network switch may be compatible with a different protocol such as Fibre Channel, 802.11, ATM and/or PCIe, for instance.

In one embodiment, each of the site module boards 130A-130N may be a separate standalone board used for purposes of evaluation and development that attaches to custom-built load board fixtures, e.g., load board 180, on which the DUTs 120A-120N are loaded, and also to the system controller 101 from where the test programs are received. In other embodiments, the site module boards may be implemented as plug-in expansion cards or as daughter boards that plug into the chassis of the system controller 101 directly.

The site module boards 130A-130N can each comprise at least one tester processor 104 and at least one FPGA device. The tester processor 104 and the FPGA devices 111A-111M on the site module board run the test methods for each test case in accordance with the test program instructions received from the system controller 101. In one embodiment the tester processor can be a commercially available Intel 8086 CPU or any other well-known processor. Further, the tester processor may be operating on the Ubuntu OS x64 operating system and running the Core Software, which allows it to communicate with the software running on the system controller, to run the test methods. The tester processor 104 controls the FPGA devices on the site module and the DUTs coupled to the site module based on the test program received from the system controller.

The tester processor 104 is coupled to and can communicate with the FPGA devices 111A-111M over bus common bus 112. In one embodiment, tester processor 104 communicates with each of the FPGA devices 111A-111M over a separate dedicated bus. In one embodiment, tester processor 104 can control the testing of the DUTs 120A-120N transparently through the FPGAs with minimal processing functionality allocated to the FPGA devices. In this embodiment, the data traffic capacity of bus 112 can be exhausted rapidly because all the commands and data generated by the tester processor need to be communicated over the bus to the FPGA devices. In other embodiments, the tester processor 104 can share the processing load by allocating functionality to control the testing of the DUTs to the FPGA devices. In these embodiments, the traffic over bus 112 is reduced because the FPGA devices can generate their own commands and data.

In one embodiment, each of the FPGA devices 111A-111M is coupled to its own dedicated memory block 140A-140M. These memory blocks can, among other things, be utilized to store the test pattern data that is written out to the DUTs. In one embodiment, each of the FPGA devices can comprise two instantiated FPGA tester blocks 110A-110B with functional modules for performing functions including implementation of communicative protocol engines and hardware accelerators as described further herein. Memory blocks 140A-140 M can each contain one or more memory modules, wherein each memory module within the memory block can be dedicated to one or more of the instantiated FPGA tester blocks 110A-110B. Accordingly, each of the instantiated FPGA tester blocks 110A-110B can be coupled to its own dedicated memory module within memory block 140A. In another embodiment, instantiated FPGA tester blocks 110A and 110B can share one of the memory modules within memory block 140A.

Further, each of the DUTs 120A-120N in the system can be coupled to a dedicated instantiated FPGA tester block 110A-110N in a “tester per DUT” configuration, wherein each DUT gets its own tester block. This allows separate test execution for each DUT. The hardware resources in such a configuration are designed in a manner to support individual DUTs with minimal hardware sharing. This configuration also allows many DUTs to be tested in parallel, where each DUT can be coupled to its own dedicated FPGA tester block and be running a different test program.

The architecture of the embodiment of the present invention depicted in FIG. 1 has several advantages. First, it eliminates the need for protocol-specific hardware bus adapter (“HBA”) sockets and cards in the system because the communication protocol modules can be programmed directly on the instantiated tester blocks within the FPGA devices. The instantiated tester blocks can be configured to communicate with the DUTs in any protocols that the DUTs support. Accordingly, if DUTs with different protocol support need to be tested, they can be coupled to the same system and the FPGAs can be reprogrammed with support for the associated protocols. As a result, one ATE body can be easily configured to test DUTs supporting many different types of protocols.

In one embodiment, new protocols can be downloaded and installed directly on the FPGAs via a simple bit-stream download from a cache on system controller 101 without any kind of hardware interactions. For example, the FPGAs 111A-111M in the ATE apparatus 100 can be configured with the PCIe protocol to test PCIe devices initially and subsequently reconfigured via a software download to test SATA devices. Also, if a new protocol is released, the FPGAs can easily be configured with that protocol via a bit-stream download instead of having to physically switch all the hardware bus adapter cards in the system. Finally, if a non-standard protocol needs to be implemented, the FPGAs can nonetheless be configured to implement such a protocol.

In another embodiment, the FPGAs 111A-111M can be configured, e.g., programmed, to run more than one communicative protocol, wherein these protocols also can be downloaded from system controller 101 and configured through software. For example, instantiated FPGA tester block 110A can be configured to run the PCIe protocol while instantiated FPGA tester block 110B can be configured to run the SATA protocol. This allows the tester hardware to test DUTs supporting different protocols simultaneously. FPGA 111A can now be coupled to test a DUT that supports both PCIe and SATA protocols. Alternatively, it can be coupled to test two different DUTs, one DUT supporting the PCIe protocol, and the other DUT supporting the SATA protocol.

Another advantage of the architecture presented in FIG. 1 is that it reduces processing load on the tester processor 104 by distributing the command and test pattern generating functionality to FPGA devices, where each DUT has a dedicated FPGA module running the test program specific to it. For instance, instantiated FPGA tester block 110A is coupled to DUT 120A and runs test programs specific to DUT 120A, for example, a solid state drive. The hardware resources in such a configuration are designed in a manner to support individual DUTs with minimal hardware sharing. This “tester per DUT” configuration also allows more DUTs to be tested per processor and more DUTs to be tested in parallel. Furthermore, with the FPGAs capable of generating their own commands and test patterns in certain modes, the bandwidth requirements on bus 112 coupling the tester processor with the other hardware components, including FPGA devices, device power supplies (DPS) and DUTs, is also reduced. As a result more DUTs can be tested simultaneously than in prior configurations.

FIG. 2 is a detailed schematic block diagram of an exemplary instantiated FPGA tester block of FIG. 2, according to an embodiment of the present invention.

Referring to FIG. 2, the instantiated FPGA tester block 210 is connected to the tester processor through PCIe upstream port 270 and to the DUT, e.g., DUT 120A of FIG. 1, through downstream port 280. It is appreciated that downstream port 280 is configured to communicate with a device under test, and may implement any required interface, including bus interfaces, for example, PCIe, ATA, SATA, NVMe, USB, SPI, JTAG, and/or SAS.

Instantiated FPGA block 210 can comprise a protocol engine module 230, a logic block module 250, and a hardware accelerator block 240. The hardware accelerator block 240 can further comprise a memory control module 244, comparator module 246, a packet builder module 245, and an algorithmic pattern generator (APG) module 243.

In one embodiment, logic block module 250 comprises decode logic to decode the commands from the tester processor, routing logic to route all the incoming commands and data from the tester processor 104 and the data generated by the FPGA devices to the appropriate modules, and arbitration logic to arbitrate between the various communication paths within instantiated FPGA tester block 210.

In one embodiment, the communication protocol used to communicate between the tester processor and the DUTs can advantageously be reconfigurable. The communicative protocol engine in such an implementation may be programmed directly into the protocol engine module 230 of instantiated FPGA tester block 210, in some embodiments. The instantiated FPGA tester block 210 can therefore be configured to communicate with the DUTs in any protocol that the DUTs support. This advantageously eliminates a need for hardware bus adapter cards, and no protocol-specific hardware needs be replaced to test DUTs with different protocol support. In one embodiment, the protocols can be high-speed serial protocols, including but not limited to SATA, SAS, or PCIe, etc. The new or modified protocols can be downloaded and installed directly on the FPGAs via a simple bit-stream download from the system controller through the tester processor without any kind of hardware interactions. Also, if a new protocol is released, the FPGAs can easily be configured with that protocol via a software download.

In FIG. 2, if the DUT coupled to the downstream port 280 is a PCIe device, for example, a bit-file containing the instantiation of the PCIe protocol may be downloaded, for example, through a JTAG interface to the FPGA devices 111A-111M. Each FPGA device 111A or 111B (FIG. 1) can comprise one or more instantiated FPGA tester blocks and, consequently, one or more protocol engine modules. The number of protocol engine modules that any one FPGA device can support is limited only by the size and gate count of the FPGA.

In one embodiment of the present invention, each of the protocol engine modules within a FPGA device can be configured with a different communicative protocol. Accordingly, an FPGA device can be connected to test multiple DUTs, each supporting a different communicative protocol simultaneously. Alternatively, an FPGA device can be connected to a single DUT supporting multiple protocols and test all the modules running on the device simultaneously. For example, if an FPGA is configured to run both PCIe and SATA protocols, it can be connected to test a DUT that supports both PCIe and SATA protocols. Alternatively, it can be connected to test two different DUTs, one DUT supporting the PCIe protocol, and the other DUT supporting the SATA protocol.

The hardware accelerator block 240 of FIG. 2 can be used to expedite certain functions on FPGA hardware than would be possible to do in software on the tester processor. The hardware accelerator block 240 can supply the initial test pattern data used in testing the DUTs. It can also contain functionality to generate certain commands used to control the testing of the DUTs. To generate test pattern data, accelerator block 240 uses the algorithmic pattern generator module 243.

The hardware accelerator block 240 can use comparator module 246 to compare the data being read from the DUTs to the data that was written to the DUTs in a prior cycle. The comparator module 246 comprises functionality to flag a mismatch to the tester processor 104 to identify devices that are not in compliance. More specifically, the comparator module 246 can comprise an error counter that keeps track of the mismatches and communicates them to the tester processor 304.

Hardware accelerator block 240 can connect to a local memory module 220. Memory module 220 performs a similar function to a memory module within any of the memory blocks 240A-240M. Memory module 220 can be controlled by both the hardware accelerator block 240 and the tester processor 104 (FIG. 1). The tester processor 104 can control the local memory module 220 and write the initial test pattern data to it.

The memory module 220 stores the test pattern data to be written to the DUTs and the hardware accelerator block 240 accesses it to compare the data stored to the data read from the DUTs after the write cycle. The local memory module 220 can also be used to log failures. The memory module would store a log file with a record of all the failures the DUTs experienced during testing. In one embodiment, the accelerator block 240 has a dedicated local memory module block 220 that is not accessible by any other instantiated FPGA tester blocks. In another embodiment, the local memory module block 220 is shared with a hardware accelerator block in another instantiated FPGA tester block.

Hardware accelerator block 240 can also comprise a memory control module 244. The memory control module 244 interacts with and controls read and write access to the memory module 220.

The hardware accelerator block 240 comprises a packet builder module 245. The packet builder module is used by the hardware accelerator block in certain modes to construct packets to be written out to the DUTs comprising header/command data and test pattern data.

In certain embodiments, hardware accelerator block 240 can be programmed by the tester processor 104 to operate in one of several modes of hardware acceleration. In bypass mode, the hardware accelerator is bypassed and commands and test data are sent by the tester processor 104 directly to the DUT through path 272. In hardware accelerator pattern generator mode, test pattern data is generated by the APG module 243 while the commands are generated by the tester processor 304. The test packets are transmitted to the DUT through path 274. In hardware accelerator memory mode, the test pattern data is accessed from local memory module 220 while the commands are generated by the tester processor 304. The test pattern data is transmitted to the DUT through path 276. Routing logic 282 is configured to arbitrate among paths 272, 274 and 276 to control the flow of data to the DUT.

The site module can comprise a plurality of general-purpose connectors 181. Because the protocol engine module 230 can be configured to run any number of various communicative protocols, a general-purpose high-speed connector 181 may be required on the site module. Accordingly, if the protocol implemented on the protocol engine module 230 needs to be changed, no accompanying physical modification needs to be made on the site module. The site module connects to the DUT using a load board, e.g., load board 180 of FIG. 1, that can connect to the general-purpose connector 181 on the site module end, but is specific to the protocol and connectors being implemented on the DUT end. DUTs supporting different communicative protocols will require different configurations. Accordingly, the load board may need to be switched out and replaced if the protocol is reprogrammed to accommodate DUTs requiring a different configuration.

In order to test a solid state drive (SSD), a tester processor, e.g., tester processor 104 of FIG. 1, sends a command to a tester block, e.g., tester block 210 of FIG. 2. Each tester block corresponds to a specific device under test (DUT), e.g., an SSD. The command is not complex, e.g., read or write an amount of data starting at an address. In accordance with embodiments of the present invention, the amount of data and the starting address need not be constrained. For example, the amount of data is not constrained to be an integral multiple of a data sector size, and the starting address is not constrained to fall on a sector boundary. In some embodiments of the present invention, the transfer may comprise an integral multiple of a data sector size, and/or the starting address may fall on a sector boundary.

FIG. 3 is an exemplary data diagram illustrating processing a command from a tester processor. The command 310 is to write 1000 bytes of data starting at address 10. In this example, each SSD sector comprises 512 bytes of data, 8 bytes of meta data. Eight bytes of protection information, in the form of a CRC, are transferred, but not stored. The CRC may cover the sector data or the sector data and the meta data, in some embodiments. Thus, the SSD transfers 528 bytes of data, and stores 520 bytes (512 bytes of data plus 8 byte of meta data).

Two sectors 320, 322 of the exemplary SSD are illustrated. Each sector stores 512 bytes of data, e.g., sector data 330, and 8 bytes of meta data, e.g., meta data 340. In response to the write command, 502 bytes of data are written to sector 1 320, beginning at address 10, and the remaining (1000−502=498) 498 bytes of data are written to sector 2, 322, beginning at address 520, the first address of sector 2 322.

It is also to be appreciated that meta data 340, 342 for each sector 320, 322 is also written. In general, such meta data is invisible to operating system and application software, and thus it is not included in the transfer of data from a tester processor. The meta data is arbitrary, and may be generated, e.g., by an algorithmic pattern generator (APG) module 243, as illustrated in FIG. 2.

It is to be further appreciated that CRC 350 and CRC 352 are transferred to the SSD, but not stored. For example, CRC 350 is computed based on the data sent to sector 1 320, including the meta data. The CRC 350 is transmitted (in the case of the exemplary write command) subsequent to the transfer of data and meta data for a sector to the SSD, and prior to the transfer of information of a next sector. Thus, 528 bytes of data are transferred for each sector, while only 520s are stored. In general, such CRC data is invisible to operating system and application software, and thus it is not included in the transfer of data from a tester processor. The CRC data may be computed, e.g., by an algorithmic pattern generator (APG) module 243, as illustrated in FIG. 2.

In some embodiments, sector data, e.g., sector data 330, 332, may be provided by a tester processor. However, in accordance with embodiments of the present invention, sector data is generated locally, e.g., by algorithmic pattern generator module 243 of FIG. 2. Generating sector data locally, e.g., within a tester block, may provide performance improvements, in comparison to generating test data by a tester processor, and transferring such test data from a tester processor to a tester block. For example, algorithmic pattern generator module 243 may generate sector data more efficiently than a general-purpose processor, e.g., tester processor 104 (FIG. 1). In addition, by generating sector data locally, such data does not have to be transferred from a tester processor to a tester block.

In accordance with embodiments of the present invention, a tester block is able to generate sector data, generate meta data, and compute CRC data in response to a high level command from a tester processor. The command does not transfer data from the tester processor.

In accordance with embodiments of the present invention, the generated sector data, generated meta data, and generated pad data are generated by a pseudo-random number generator, based on sector number, or sector start address. For example, sector number is used as a partial seed for a pseudo-random number generator. For example, a pseudo-random number generator has a first seed, or a first portion of a seed, that is fixed for a given test. The pseudo-random number generator has a second seed, or a second portion of a seed, that is the sector number. In this novel manner, the same pseudo-random sequence is always generated for any given sector, as long as the first seed, or first portion of a seed is unchanged. The first seed, or first portion of a seed, may be changed for subsequent testing, to ensure that different data is written to the exemplary sector for different tests.

For a given test, e.g., for a fixed first seed, or first portion of a seed, the same pseudo-random data is always generated and written to a given sector. Thus, when reading from the given sector, the pseudo-random sequence may be generated again for comparison to the data that was written according to the same pseudo-random sequence. Accordingly, write data does not need to be maintained in the test equipment during a test. Rather, a pseudo-random sequence, based on sector number, is generated and written to an SSD. When a given sector is subsequently read, the same pseudo-random sequence, based on sector number, is generated on the test equipment, e.g., by an algorithmic pattern generator (APG) module 243, as illustrated in FIG. 2, for comparison with the data read from the SSD.

It is to be appreciated that a typical SSD may store much greater volumes of data than typical computer “working” memories, e.g., DRAM. In this novel manner, an SSD under test may be commanded to store more data than may be contained by available working memory, e.g., memory located in memory block 220 of FIG. 2, or associated with tester processor 104 (FIG. 1). In accordance with embodiments of the present invention, the pseudo-random sequences stored to the SSD under test do not need to be stored outside of the SSD, e.g., within the test equipment, so that the data may later be compared with data read from the SSD under test. Further, since the data written does not need to be stored within the test equipment, e.g., for a subsequent verification, the test equipment is able to execute numerous commands between writing a given sector, and reading that sector.

Still with reference to FIG. 3, an exemplary read command will be described. The exemplary read command 312 is the complement of command 310, e.g., “read 1000 bytes starting at 10.” The test equipment determines where the data is located in terms of SSD sectors. In this embodiment, the 1000 bytes of data are contained within sectors 1 320 and 2 322. Thus, the test system commands the SSD to read sectors 1 320 and 2 322. In response, the test system receives 1056 bytes of data from the SSD, e.g., 528 bytes for each of sector 1 320 and sector 2 322. The received data includes 8 bytes of CRC data for each sector. The tester may optionally compute a CRC for the received data to compare with the received CRC.

The tester receives two blocks of sector data, e.g., 330, 332, and two blocks of meta data, e.g., 340, 342. If the tester processor requests the actual data, the tester block may strip out the pad data prior to sending the actual data to the tester processor. In accordance with embodiments of the present invention, the read data may be verified by the tester block, e.g., tester block 210 of FIG. 2, without sending the data to a tester processor and without storing the data outside of the specific SSD under test.

If the tester processor optionally commands the tester block to verify the read data, the tester block may generate the pseudo-random sequence, based on the sector number(s) read, and compare the read data with the pseudo-random sequence. For example, if all sector data corresponds to the regenerated pseudo-random sequence(s), and all CRCs compare, the tester block may report to the tester processor that the write and read operations were verified and successful.

Testing a solid state drive generally involves writing data to the solid state drive, reading back the data from the solid state drive, and comparing the written data to the data that is read. Solid state drives are generally referred to or known as “storage” devices, which are differentiated from computer “memory” or “memory devices.” “Memory” and “storage” are generally described or referred to as being at different levels of a computer memory “hierarchy.” Unlike “memory,” storage devices in general, and solid state drives more particularly, typically read and write data in “sectors,” e.g., blocks of, for example, 256 or 512 bytes. In general, individual bytes within a sector may not be directly accessed. For example, the third byte of a sector may not be read without reading the entire sector.

It is generally desirable to test a solid state drive based on arbitrary starting addresses. For example, the starting address of a write command is not required to be aligned with the start of a sector. Accordingly, it is necessary to determine where such an arbitrary address falls within the sectors of an SSD. For example, with reference to the example of FIG. 3, the tester must determine which SSD sector contains the data at the arbitrary address of 10. The tester must also determine which subsequent sectors are to be written or read, based on the arbitrary amount of data.

These calculations must be performed for every read and/or write command issued by a tester processor. It is thus desirable to perform such calculations as fast as possible, such that such “address to sector” do not degrade the rate of testing of an SSD.

Under the conventional art, with sector sizes for SSD and hard disk drives traditionally a power of an integral power of two, e.g., 256 or 512 bytes, determination of a sector number from a given, arbitrary, address was considered “simple,” as the calculation could be performed primarily by shifting a binary number in a register. As is well known, such shifting of a binary number performs multiplication or division by powers of two. Such shifting is generally considered a very fast operation.

However, if a sector size, e.g., of an SSD, is not an integral power of two, e.g., 520 bytes, the calculation of a sector number from a given, arbitrary, address is not considered “simple.” For example, SNum=Addr/520  (Relation 1) SOs=Addr % 520  (Relation 2) where “Addr” is the Address input to calculate Sector Number, “SNum” is the Sector Number, “SOs” is the Sector Offset, and “%” is the modulus operator.

A first translation method uses multipliers as a divider:

$\begin{matrix} {{SNum} = \left( {{Addr}/520} \right)} \\ {= \left( {{Addr}*\left( {1/520} \right)} \right)} \\ {= {\left( {{Addr}*\left( {2\bigwedge{N/520}} \right)} \right){2\bigwedge N}}} \\ {= {\left( {{Addr}*\left( {1{\operatorname{<<}{N/}}\; 520} \right)} \right) ⪢ N}} \end{matrix}$ where 2{circumflex over ( )}N is a fixed scaling constant so that 2{circumflex over ( )}N/520 is an integer large enough to compute SNum without rounding errors for any Address within a given range. It is appreciated that multipliers usually require pipeline stages which takes clock cycles, which in turn increase latency.

This translation approach requires multipliers which generally impose an unacceptable latency time. Accordingly, a typical implementation of this method may be considered unacceptably slow.

In accordance with embodiments of the present invention, the sector number may be determined from a given address using only addition and subtraction, based on the assumption that there is an “address prime” that can be determined by division by 2, e.g., shifting a binary number, that is close enough to the actual address, e.g., “addr,” divided by the actual sector size, e.g., 520. For example, given a sector size of 520, as before, then SNum=Addr/520. Is there an Addr′ such that Addr/520 is equivalent to Addr′/512.

EXAMPLE

Use Addr=10,400 and SectorSize=520 as example

Correct Answer is:

SNum=10,400/520=20.0000

Addr′ should be:

Addr′=SNum*512

=20.000*512

=10,240

10400/520==10240/512

20==20

Simply dividing by 512, e.g., an integral power of two, which may be implemented by shifting, instead of the actual sector size 512, produces an error:

First Approximation

10,400/512=20.3125

Result is High by (520/512), or by 1/64 too high.

Adjusting the result DOWN by 1/64{circumflex over ( )}2 results in:

Second Approximation

10,400/512−10400/512/64=20.3125−0.3173828125=19.9951171875

Result is low by 520/512/64 or by 1/64{circumflex over ( )}2.

Adjusting the second approximation UP by 1/64{circumflex over ( )}3

Third Approximation

10,400/512−10400/512/64+10400/512/64/64

=20.3125−0.3173828125+0.0049591064453125

=20.0000076293945

Result is high by 520/512/64/64 or by 1/64{circumflex over ( )}3

This pattern continues until enough sectors have been identified to include the specified amount of data in the test command.

In general, an Address input to calculate Sector Number, “addr,” may be transformed to address prime, “addr′,” as described below. It is appreciated at all division is by an integral power of two, which can be implemented by shifting a binary number.

Address Prescaled UP for accuracy, (plus add ½ LSB for rounding)

AddrPS=(Addr<<N)+(1<<N−1) (e.g. N=24)

AddrPs=10,400.5<<24=174,491,435,008

=0x28a0<<24=0x28a0000000

+1<<23=0x28a0800000

where “AddrPS” is an address that has been prescaled for accuracy.

The following transform is done with Prescale Address, then scaled back down.

Addr′=(AddrPS−Correction1+Correction2−Correction3)>>N

=(AddrPS−AddrPs>>6+AddrPs>>12−AddrPs>>18)>>N

=(0x28a0800000−0xA2820000+0x28a0800−0xA2820)>>24

=0x28007DDFE0>>24

=0x2800

=10,240

The following illustrates a “Calculate SNum” operation using Addr′/512 (instead of Addr/520):

SNum=Addr′/512

=10240/512

=0x2800>>9

=0x0014

=20

Sector Start is Address where SOs==0

SecStart=SNum*(512+8)

=(SNum*512)+(SNum*8)

=(SNum<<9)+(SNum<<3)

=20*512+20*8

=10,240+160

=10,400

Sector Offset=Addr−SecStart

where “SecStart” is the starting address for a given sector.

All math uses only simple Add/Subtract/Shift-Left/Shift-Right operations. In addition, the calculations may be pipelined at any level needed, or none if not needed.

Other non-standard sector sizes may be similarly implemented using different scaling:

520 512 + 8 Difference is 8/512 or 1/64 Shift is by 6 528 512 + 16 Difference is 16/512 or 1/32 Shift is by 5 4104 4K + 8 Difference is 8/4096 or 1/512 Shift is by 9 4112 4K + 16 Difference is 16/4096 or 1/256 Shift is by 8 4160 4K + 64 Difference is 64/4096 or 1/64 Shift is by 6 4224 4K + 128 Difference is 128/4096 or 1/32 Shift is by 5

The above-described operations may be performed by hardware-based logic, e.g., within logic block 250 of tester block 210 (FIG. 2), in some embodiments. A logic-based implementation of the operations generally will be sufficiently fast so as not to slow down test operations. Such logic may be synthesized according to the descriptions above. In some embodiments, such operations may be performed by a processor operating under software control.

FIG. 4 illustrates an exemplary machine-implemented method 400 of write-testing a solid state drive (SSD) having a non-standard sector size, e.g., a sector size that is not an integral power of two, in accordance with embodiments of the present invention. Method 400 may be implemented in hardware, e.g., controlled by state machines, in a processor, e.g., controlled by program instructions, on in a combination of the two. In 410, a command is received to write an amount of data, starting at a starting address, to an SSD under test. In 420, a starting sector of the SSD that the starting address points to is determined, for example, according to the processes presented above. In 430, the number of sectors required for the amount of data is determined.

In 440, pseudo-random data, based on a sector number, is generated. In optional 450, a CRC is generated for the sector's pseudo-random data. In 460, the pseudo-random data, and optionally the CRC, is written to the SSD for a next sector. The data written to the SSD is not stored outside of the SSD. For example, the data written is not stored in the tester block 210 or local memory 220 of FIG. 2, the data written is not stored in the tester processor 104, and the data written is not stored in system controller 101 of FIG. 1. If the write is successful, the method continues at 440, until the amount of data has been written. If the write operation is not successful, the sector number and type of error is logged for reporting. In some embodiments, the amount of data written to the SSD may exceed the amount of memory available on the test apparatus.

FIG. 5 illustrates an exemplary machine-implemented method 500 of read/verify-testing a solid state drive (SSD) having a non-standard sector size, e.g., a sector size that is not an integral power of two, in accordance with embodiments of the present invention. Method 500 may be implemented in hardware, e.g., controlled by state machines, in a processor, e.g., controlled by program instructions, on in a combination of the two. In 510, a command is received to read and verify an amount of data, starting at a starting address, from an SSD under test. In 520, a starting sector of the SSD that the starting address points to is determined, for example, according to the processes presented above. In 530, the number of sectors required for the amount of data is determined.

In 540, a next sector is read from the SSD. In 550, pseudo-random data, based on a sector number, is generated. In optional 560, a CRC is generated for the sector's pseudo-random data and compared to the CRC provided from the SSD. In 570, the sector data is compared to the pseudo-random data. If this comparison of sector data, and the optional CRC comparison are verified, the method continues at 540, until the amount of data has been read and verified. If the comparison of sector data and/or the optional CRC comparison fails, the sector number and type of error is logged for reporting.

In this novel manner, data can be verified when read from an SSD without having to store the data elsewhere, e.g., within the test equipment. This enables large quantities of data to be written and read back later for verification. For example, an SSD may be written and then removed from the test equipment for long duration data integrity tests, e.g., at stressing environmental conditions. The valuable test equipment may be utilized for other testing during this time. Under the conventional art, the test equipment must maintain a copy of the data written to the SSD for later verification. Embodiments in accordance with the present invention do not require the test equipment must maintain a copy of the data written to the SSD for later verification, speeding up operation, reducing the memory requirements of the test equipment, and enabling new types of tests, e.g., long duration data integrity tests, heretofore commercially infeasible under the conventional art.

Embodiments in accordance with the present invention provide systems and methods for fast address to sector number/offset translation to support odd sector size testing. In addition, embodiments in accordance with the present invention provide systems and methods for fast address to sector number/offset translation to support odd sector size testing that do not require division by denominators that are not integral powers of two. Further, embodiments in accordance with the present invention provide systems and methods for fast address to sector number/offset translation to support odd sector size testing that are compatible and complementary with existing systems and methods of automated test equipment.

Various embodiments of the invention are thus described. While the present invention has been described in particular embodiments, it should be appreciated that the invention should not be construed as limited by such embodiments, but rather construed according to the below claims. 

What is claimed is:
 1. A machine-implemented method of testing a solid state drive (SSD) on an automated test equipment (ATE), wherein the SSD sector size is not an integral power of 2, the method comprising: receiving a command to write an amount of data corresponding to the SSD sector size to said SSD starting at a sector address within a command address space of standard sized sectors; translating said sector address in said command address space to a sector number in an address space corresponding to said SSD, wherein said address space of said SSD comprises non-standard sector sizes, and wherein said translating comprises: determining an approximate sector size as the closest power of 2 less than the SSD sector size; determining an error factor as the ratio of the approximate sector size divided by the SSD sector size; forming the sector number by shifting the SSD address right by the base 2logarithm of the approximate sector size; generating write data of said amount of data by an algorithmic pattern generator module of said ATE; writing said write data to said sector number of said SSD; reading read data of said amount of data from said sector number of said SSD; comparing the read data to the write data as a test of the solid state drive; and creating a pass-fail test result of said testing based on a result of said comparing.
 2. The method of claim 1 further comprising: shifting the sector number right by the base 2 logarithm of the square of the error factor to form an improved sector number.
 3. The method of claim 1 further comprising: shifting the sector number left by the base 2 logarithm of the cube of the error factor to form an improved sector number.
 4. The method of claim 1 further comprising: alternatively shifting the sector number right by the base 2 logarithm of the error factor raised to a sequentially higher even power; and alternatively shifting the sector number left by the base 2 logarithm of the error factor raised to a sequentially higher odd power.
 5. The method of claim 1 further comprising: forming a prescaled address by left shifting the address by a number; and forming a sector number by right shifting the prescaled address by the number.
 6. The method of claim 5 further comprising: subtracting the base 2 logarithm of the square of the error factor from said prescaled address prior to right shifting the prescaled address.
 7. The method of claim 6 further comprising: adding the base 2 logarithm of the cube of the error factor from said prescaled address prior to right shifting the prescaled address.
 8. An automated test equipment (ATE) for simultaneous testing of multiple solid state drives (SSDs), wherein the SSD has a sector size that is not an integral power of two, the ATE comprising: logic of said ATE configured to determine a starting sector of the SSD that corresponds to a given starting address within a command address space of standard sized sectors, wherein said logic is configured to: translate said sector address in said command address space to a sector number in an address space corresponding to said SSD, wherein said address space of said SSD comprises non-standard sector sizes, and wherein said translating comprises logic configured to: determine an approximate sector size as the closest power of 2 less than the sector size; determine an error factor as the ratio of the approximate sector size divided by the sector size; and form the sector number by shifting the address right by the base 2 logarithm of the approximate sector size, wherein said ATE is configured to send a write command to said multiple solid state drives to write data at said starting sector, wherein said ATE is configured to send a read command to said multiple solid state drives to read data at said starting sector, and wherein said ATE is configured to compare the read data with the write data as a test of the multiple SSDs, and wherein said ATE is configured to create a pass/fail test result of said testing based on a result of said compare operation.
 9. The ATE of claim 8, wherein said logic is further configured to shift the sector number right by the base 2 logarithm of the square of the error factor to form an improved sector number.
 10. The ATE of claim 9 wherein said logic is further configured to shift the sector number left by the base 2 logarithm of the cube of the error factor to form an improved sector number.
 11. The ATE of claim 8 wherein said logic is further configured to: alternatively shift the sector number right by the base 2 logarithm of the error factor raised to a sequentially higher even power; and alternatively shift the sector number left by the base 2 logarithm of the error factor raised to a sequentially higher odd power.
 12. The ATE of claim 8 wherein said logic is further configured to: form a prescaled address by left shifting the address by a number; and form a sector number by right shifting the prescaled address by the number.
 13. The ATE of claim 8 wherein said logic is further configured to subtract the base 2 logarithm of the square of the error factor from said prescaled address prior to right shifting the prescaled address.
 14. The ATE of claim 8 configured to test SSD sector sizes of 520, 528, 4104, 4112, 4160, and 4224 bytes.
 15. A system for simultaneous testing of multiple solid state drives (SSDs), wherein the SSD has a sector size that is not an integral power of two, the system comprising: a tester block configured to receive a command to write an amount of data to the SSD starting at a starting address, wherein the starting address is not constrained to correspond to a sector boundary and the amount of data is not constrained to be an integral multiple of the SSD data sector size; logic within said tester block configured to determine a starting sector of the SSD corresponding to the starting address, wherein said logic is configured to: determine an approximate sector size as the closest power of 2 less than the sector size; determine an error factor as the ratio of the approximate sector size divided by the sector size; form the sector number by shifting the address right by the base 2 logarithm of the approximate sector size, wherein said system is configured to test said SSD, and wherein said testing comprises writing said amount of data to said SSD starting at said sector number, reading said amount of data from said SSD starting at said sector number, and comparing said amount of data read to said amount of data written as a test of the multiple solid state drives.
 16. The system of claim 15, wherein said logic is further configured to shift the sector number right by the base 2 logarithm of the square of the error factor to form an improved sector number.
 17. The system of claim 16 wherein said logic is further configured to shift the sector number left by the base 2 logarithm of the cube of the error factor to form an improved sector number.
 18. The system of claim 15 wherein said logic is further configured to: alternatively shift the sector number right by the base 2 logarithm of the error factor raised to a sequentially higher even power; and alternatively shift the sector number left by the base 2 logarithm of the error factor raised to a sequentially higher odd power.
 19. The system of claim 15 wherein said logic is further configured to: form a prescaled address by left shifting the address by a number; and form a sector number by right shifting the prescaled address by the number.
 20. The system of claim 1 wherein a data written to the SSD is not stored outside of the SSD after being written to the SSD. 